# Reading csv file tests Students have report a problem with the read.csv() function not finding the targeted file. 1. Apparently on a MAC the file must be double quotes not single quotes 2. On windows the path part of the name needs to have forward slashes. Below are my tests on a windows operating systems. Everything worked except the backward slashes Side Note: One of my firsts test failed because my target file was not a .csv but rather a Excel file that uses the same icon. #_______________________________________________________________________________ # Test 1: the file in the working direction read.csv("hsaPoly.csv") # works # Test 2a for windows - copying and the path as is pathFile1 = "C:\Documents and Settings\Daniel Carr\My Documents\R-2.4.0\hsaPoly.csv" read.csv(file=pathFile1) # Fails # Test 2b using forward slashes pathFile2 = "C:/Documents and Settings/Daniel Carr/My Documents/R-2.4.0/hsaPoly.csv" read.csv(file=pathFile2) # works # Test 3 using forward slashes for a file not in the working directory pathFile3 = "C:/Documents and Settings/Daniel Carr/My Documents/CSI703/Data/Tretinoin.csv" read.csv(file=pathFile3) #works # Test 4 With the R Console active, under the File menu there is a change dir # options the lead to a brower. Using this I changed the working directory # to C:\Documents and Settings\Daniel Carr\My Documents\CSI703\Data read.csv("Tretinoin.csv") #works